package com.hukun.ssm1110.controller;

import com.hukun.ssm1110.entity.Supplier;
import com.hukun.ssm1110.entity.User;
import com.hukun.ssm1110.mapper.SupplierMapper;
import com.hukun.ssm1110.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class SupplierContronller {

    @Autowired
    SupplierMapper supplierMapper;


    @ResponseBody
    @RequestMapping("/getSuppliers")
    public List<Supplier> getSuppliers() {
        List<Supplier> suppliers = supplierMapper.getSuppliers();
        return suppliers;
    }
}
